package com.docking.heylo;

import com.docking.heylo.pojo.Request;


public class ThreadContext {

    public static ThreadLocal<Request> authorize = new ThreadLocal<>();

    public static Integer userId(){
        return authorize.get().getUserId();
    }

    public static Integer roleId(){
        return authorize.get().getRoleId();
    }

    public static String  userName(){
        return authorize.get().getUserName();
    }


    public static String requestIP() {
        return authorize.get().getIp();
    }
}
